Particles = {}
Particles.__index = Particles

function Particles.getGlowParticleSys(x,y)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 100)
	p:setEmissionRate(100)
	p:setSpeed(3, 4)
	p:setSizes(14, 14)
	p:setColors(220, 105, 20, 255, 194, 30, 18, 0)
	p:setPosition(x, y)
	--p:setLifetime(0.1)
	p:setParticleLife(1.0)
	p:setDirection(0)
	p:setSpread(360)
	p:setTangentialAcceleration(1000)
	p:setRadialAcceleration(-200)
	return p
	
end

function Particles.getObjectParticleSys(x,y)

   local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 1000)
	p:setEmissionRate(200)
	p:setSpeed(300, 400)
	p:setSizes(1, 2)
	p:setColors(255, 255, 255, 255, 255, 128, 128, 0)
	p:setPosition(x, y)
	--p:setLifetime()
	p:setParticleLife(2)
	p:setDirection(0)
	p:setSpread(360)
	p:setTangentialAcceleration(0)
	p:setRadialAcceleration(-8000)
	return p
		
end

function Particles.getFuzzParticleSys(x, y)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 1000)
	p:setEmissionRate(100)
	p:setSpeed(225, 225)
	p:setSizes(.25, .5)
	p:setColors(255, 255, 255, 255, 255, 255, 255, 0)
	p:setPosition(x, y)
	--p:setLifetime()
	p:setParticleLife(.3)
	p:setDirection(1)
	p:setSpread(360)
	p:setTangentialAcceleration(-100)
	p:setRadialAcceleration(-850)
	return p
	
end

function Particles.getStarParticleSys(x, y, life, em)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 1)
	p:setEmissionRate(1 * em)
	p:setSpeed(1, 1)
	p:setSizes(.1, .1)
	p:setColors(255, 255, 255, 255, 0, 0, 0, 0)
	p:setPosition(x, y)
	p:setParticleLife(1 * life)
	p:setDirection(0)
	p:setSpread(0)
	p:setTangentialAcceleration(0)
	p:setRadialAcceleration(0)
	return p
	
end

function Particles.getCollectibleParticleSys(x,y)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 20)
	p:setEmissionRate(20)
	p:setSpeed(100, 100)
	p:setSizes(2, 1)
	p:setColors(10, 105, 20, 255, 194, 30, 18, 0)
	p:setPosition(x, y)
	--p:setLifetime(0.1)
	p:setParticleLife(1.0)
	p:setDirection(0)
	p:setSpread(360)
	p:setTangentialAcceleration(500)
	p:setRadialAcceleration(-2000)
	return p
	
end
function Particles.getParasiteParticleSys(x,y)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 5)
	p:setEmissionRate(5)
	p:setSpeed(50, 50)
	p:setSizes(1, 1)
	p:setColors(255, 0, 0, 255, 0, 0, 18, 0)
	p:setPosition(x, y)
	--p:setLifetime(0.1)
	p:setParticleLife(1.0)
	p:setDirection(0)
	p:setSpread(360)
	p:setTangentialAcceleration(500)
	p:setRadialAcceleration(-2000)
	return p
		
end
function Particles.getShieldParticleSys(x, y)

	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 1000)
	p:setEmissionRate(200)
	p:setSpeed(4000, 4000)
	p:setSizes(.25, .25)
	p:setColors(255, 128, 0, 255, 255, 128, 0, 0)
	p:setPosition(x, y)
	--p:setLifetime()
	p:setParticleLife(1)
	p:setDirection(1)
	p:setSpread(360)
	p:setTangentialAcceleration(1000)
	p:setRadialAcceleration(2000)
	return p
	
end

function Particles.dieParasiteParticleSys(x, y)
	local p = {}
	part1 = love.graphics.newImage("particle.png");
	p = love.graphics.newParticleSystem(part1, 500)
	p:setEmissionRate(500)
	p:setSpeed(300, 400)
	p:setGravity(0)
	p:setSizes(0.25, 0.25)
	p:setColors(255, 0, 0, 255, 0, 0, 0, 0)
	p:setPosition(x, y)
	p:setLifetime(0)
	p:setParticleLife(1)
	p:setDirection(0)
	p:setSpread(180)
	p:setRadialAcceleration(0)
	p:setTangentialAcceleration(10)
	p:stop()
	return p
end
